<!--岩土描述详情-->
<template>
  <div class="app-container-add">
    <el-dialog
      v-dialogDrag
      :title="dialogTitle"
      :visible.sync="dialogVisible"
      class="dialogStyleSmall"
      :before-close="cancel"
    >
      <el-form
        ref="addForm"
        class="dialog-form"
        :model="formData"
        label-width="80px"
      >
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="岩土描述" prop="content">
              <el-input v-model="formData.content" type="textarea" :rows="3" readonly placeholder="" size="medium" />
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="" prop="orderNum">
              <label slot="label" v-html="`排&emsp;&emsp;序`" />
              <el-input-number
                v-model="formData.orderNum"
                style="width:100%"
                size="medium"
                disabled
                controls-position="right"
                :min="1"
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-dialog>
  </div>
</template>
<script>
// dialog-footer
import { detailRocksoil } from '@/api/superviseBaseInfo/rocksoil'
export default {
  name: 'DetailDialog',
  components: {
  },
  data() {
    return {
      /* 新增 start*/
      dialogTitle: '', // 弹层标题
      dialogVisible: false, // 弹层是否显示
      formData: { // 新增数据
        content: '', // 岩土描述
        orderNum: '', // 排序
        createName: '' // 创建人名称
      }
      /* 新增 end*/
    }
  },
  methods: {
    /* 新增/编辑弹层 start*/
    // 新增/编辑
    handleAdd(title, id) {
      this.emptyAddForm() // 清空司钻员
      this.dialogVisible = true
      this.dialogTitle = title
      this.handleDetail(id)
    },
    async handleDetail(id) {
      const { data } = await detailRocksoil(id)
      this.formData = { ...data }
    },
    // 提交按钮
    submitForm() {
      this.dialogVisible = false
    },
    // 取消按钮
    cancel() {
      this.dialogVisible = false
    },
    // 表单重置
    emptyAddForm() {
      this.resetForm('addForm')
      this.formData.id = ''
    }
    /* 新增/编辑弹层 end*/
  }
}
</script>

<style scoped>
</style>
